package interview.huawei.tjt.training.huaweijishitiku;

import java.util.Scanner;

// 使用Java函数进行字符串最后一个单词的长度的求解
public class StringLength {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] s = str.split(" ");
        int length = s[s.length - 1].length();
        System.out.println(length);
    }
}
